﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

namespace QJY.API
{
    public class LDAPUser
    {
        public byte[] ObjectGuid { get; set; }

        [System.Obsolete("Use ObjectGuidAsString instead")]
        public string ObjectGuidAsHex
        {
            get
            {
                var hex = new StringBuilder(this.ObjectGuid.Length * 2);
                foreach (byte b in this.ObjectGuid)
                {
                    hex.AppendFormat("{0:X2}", b);
                }
                return hex.ToString();
            }
        }

        public string ObjectGuidAsString
        {
            get
            {
                return new System.Guid(ObjectGuid).ToString().ToUpper();
            }
        }


        public string CommonName { get; set; }


        public string DisplayName { get; set; }


        public string GivenName { get; set; }


        public string SurName { get; set; }


        public string Email { get; set; }


        public string Phone { get; set; }

        public string Mobile { get; set; }


        public string Title { get; set; }


        public string Department { get; set; }


        public string PhysicalDeliveryOfficeName { get; set; }


        public string LocalityName { get; set; }


        public string StateOrProvinceName { get; set; }


        public string CountryName { get; set; }


        public string Description { get; set; }


        public string Domain { get; set; }

        public string DistinguishedName { get; set; }

        public string SamAccountName { get; set; }

        public string UserPrincipalName { get; set; }
        public byte[] JpegPhoto { get; set; }

        public string Manager { get; set; }
        public string Company { get; set; }

        public List<string> DirectReports { get; set; }
    }


    public enum LDAPUserStatus
    {
        UserNotFound = 0,
        Success,
        InvalidPassword,
        ExpiredPassword,
        MustChangePassword,
        UserLockedOut
    }



}